﻿using System;

namespace Zadani09
{
    public partial class Default : System.Web.UI.Page
    {

        protected void Page_Init(object sender, EventArgs e)
        {
            GridView1.SelectedIndexChanged += new EventHandler(GridView1_SelectedIndexChanged);
        }

        void GridView1_SelectedIndexChanged(object sender, EventArgs e)
        {
            Label2.Visible = true;
        }
        
        protected void Page_Load(object sender, EventArgs e)
        {
            if (GridView1.Rows.Count <= 0)
            {
                Label1.Text = "Dnes se žádné výstavy nekonají";
                Label2.Visible = false;
            }
            else
            {
                Label1.Text = string.Empty;
            }
        }
    }
}
